package cn.huoyingkeji.system.service.impl;

import cn.huoyingkeji.system.dto.TenantDTO;
import cn.huoyingkeji.system.entity.SysTenant;
import cn.huoyingkeji.system.mapper.SysTenantMapper;
import cn.huoyingkeji.system.service.TenantService;
import cn.hutool.core.bean.BeanUtil;
import cn.huoyingkeji.mybitisplus.service.impl.MybatisplusServiceImpl;

import org.springframework.stereotype.Service;

@Service
public class SysTenantServiceServiceImpl extends MybatisplusServiceImpl<SysTenantMapper, SysTenant, TenantDTO> implements TenantService{

    @Override
    public TenantDTO toDTO(SysTenant entity) {
        TenantDTO dto = new TenantDTO();
        BeanUtil.copyProperties(entity, dto, false);
        return dto;
    }

    @Override
    public SysTenant toEntity(TenantDTO dto) {
        SysTenant entity = new SysTenant();
        BeanUtil.copyProperties(dto, entity , false);
        return entity;
    }

    
}
